package com.serviceImpl;

import com.dao.AuthRuleDao;
import com.model.AuthRule;
import com.service.AuthRuleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: AuthRuleServiceImpl
 * @Description: 权限管理规则服务层实现类
 * @author 陈靖
 * @date 2017-1-17 下午2:40:32
 */
@Service
public class AuthRuleServiceImpl implements AuthRuleService {
	@Resource
	private AuthRuleDao authRuleDao;

	/*
	 * Title: getAuthRuleList Description: 获取权限管理规则列表
	 * 
	 * @return List<AuthRule>
	 * 
	 * @see com.service.AuthRuleService#getAuthRuleList()
	 */
	public List<AuthRule> getAuthRuleList(AuthRule authRule) {
		return authRuleDao.getAuthRuleList(authRule);
	}

	/*
	 * Title: insertAuthRule Description: 添加规则
	 * 
	 * @param authRule
	 * 
	 * @return int
	 * 
	 * @see com.service.AuthRuleService#insertAuthRule(com.model.AuthRule)
	 */
	public int insertAuthRule(AuthRule authRule) {
		return authRuleDao.insertAuthRule(authRule);
	}

	/*
	 * Title: deleteAuthRule Description: 删除规则
	 * 
	 * @param authRule
	 * 
	 * @return int
	 * 
	 * @see com.service.AuthRuleService#deleteAuthRule(com.model.AuthRule)
	 */
	public int deleteAuthRule(AuthRule authRule) {
		return authRuleDao.deleteAuthRule(authRule);
	}

	/*
	 * Title: getAuthRuleMessageList Description: 获取权限信息列表(id,name,mid)
	 * 
	 * @return List<AuthRule>
	 * 
	 * @see com.service.AuthRuleService#getAuthRuleMessageList()
	 */
	public List<AuthRule> getAuthRuleMessageList() {
		return authRuleDao.getAuthRuleMessageList();
	}

	public List<AuthRule> getNamebyid(AuthRule authRule) {
		return authRuleDao.getNamebyid(authRule);
	}

}
